import {
    Request
} from "../utils/request";
//主页中  统计接口
export const home = (data) => Request({
    // url:"http://adminv2.happymmall.com/manage/statistic/base_count.do",
    // url:"http://adminv2.happymmall.com/manage/product/list.do",
    url: "/api/statistic/base_count.do",
    method: "get",
    data: data
});
// 登录
export const login = (data) => Request({
    url: "/api/user/login.do",
    method: "post",
    params: data
});
// 用户列表
export const userList = (data) => Request({
    url: "/api/user/list.do",
    method: "post",
    params: data,
});
// 商品管理列表
export const productList = (data) => Request({
    url: "/api/product/list.do",
    method: "get",
    params: data,
});
// 更改商品状态
export const change = (data) => Request({
    url: "/api/product/set_sale_status.do",
    method: "get",
    params: data,
});
// 搜索商品
export const productSearch = (data) => Request({
    url: "/api/product/search.do",
    method: "get",
    params: data,
});
// 新增商品
export const productAdd = (data) => Request({
    url: "/api/product/save.do",
    method: "get",
    params: data,
});
// 级联选择器     
export const options = (data) => Request({
    url: "/api/category/get_category.do",
    method: "get",
    // params: data,
});
// 级联选择器    子类
export const options2 = (data) => Request({
    url: "/api/category/get_category.do",
    method: "get",
    params: data,
});
// 商品详情
export const productDetail = (data) => Request({
    url: "/api/product/detail.do",
    method: "get",
    params: data,
});
// 修改商品
export const productEditor = (data) => Request({
    url: "/api/product/save.do",
    method: "get",
    params: data,
});
// 订单管理
export const orderList = (data) => Request({
    url: "/api/order/list.do",
    method: "get",
    params: data,
});
// 订单搜索
export const orderSearch = (data) => Request({
    url: "/api/order/search.do",
    method: "get",
    params: data,
});
// 订单详情
export const orderDetail = (data) => Request({
    url: "/api/order/detail.do",
    method: "get",
    params: data,
});
// 品类管理
export const categoryList = (data) => Request({
    url: "/api/category/get_category.do",
    method: "get",
    params: data,
});
// 修改品类名称
export const categoryUpname = (data) => Request({
    url: "/api/category/set_category_name.do",
    method: "get",
    params: data,
});
//添加品类
export const categoryadd = (data) => Request({
    url: "/api/category/add_category.do",
    method: "get",
    params: data,
});
//上传图片
// export const categoryadd = (data) => Request({
//     url: "/api/category/add_category.do",
//     method: "get",
//     params: data,
// });